﻿using Microsoft.EntityFrameworkCore;
using PesticideManage.API.Services.Identity.RoleAggregate;
using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;

namespace PesticideManage.API.Services.Menus;
[Owned]
public class Meta
{
    public string Icon { get; set; } = string.Empty;
}
public class Menu
{
    [Key]
    public string Name { get; set; } = string.Empty;
    public int Order { get; set; }
    public Meta? Meta { get; set; }
    [JsonIgnore]
    public ICollection<Role>? Roles { get; set; }
    public ICollection<Menu>? Children { get; set; } 
}
